<template>
  <div>
    <div class="title border-bottom">周末去哪</div>
    <ul>
      <li class="item" v-for="i of weekendList " :key="i.id">
        <div class="item-img-wrapper" >
          <img class="item-img" :src="i.imgUrl">
        </div>
        <div class="item-infos">
          <p class="item-info">{{i.title}}</p>
          <p class="item-title">{{i.info}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'weekend',
  props: {
    weekendList: [],
  },
  data() {
    return { };
  },
};
</script>

<style scoped>
  .title{
    line-height: 40px;
    background: #cccccc;
    text-indent: 10px;
  }
  .item-img-wrapper{
    overflow: hidden;
    height: 0;
    padding-bottom: 33.9%;
    background: #00bcd4;
  }
  .item-img{
    width: 100%;
  }
  .item-infos{
    flex: 1;
    padding: 1px;
    min-width: 0;
  }
  .item-title{
    font-size: 10px;
    line-height: 10px;
    /*下面三个用样式控制文字多了隐藏*/
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .item-info{
    font-size: 15px;
    line-height: 15px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

</style>
